<script type="text/javascript">
$(function () {
	addFilesUploadEvent_Certificates();
});
</script>
<#import "/freemarker/datetime.ftl" as dt>
<div class="widget" style="float:left; width:720px;">
	<div class="widget-header">
		<h3 class="title"><i class="fontello-icon-th-list-1"></i>证书荣誉上传编辑</h3>
	</div>
	<div class="widget-content">
		<form id="editCertificatesForm">
			<input type="hidden" name="oc" value="${(cu_organCode)!''}"/>
			<input type="hidden" name="fileCode" id="fileCode" /> 
			<table class="table boo-table table-content" style="width:100%; text-align:left;">
				<tr>
					<td>证书名称</td>
					<td>
						<input type="hidden" id="code" name="code" value="${(certificates.code)!''}"/>
						<input type="text" id="name" name="name" value="${(certificates.name)!''}" style="width:280px;" />
					</td>
				</tr>
				<tr>
					<td class="table-left" style="width:120px;">发放机构</td>
					<td><input type="text" id="grantOrgan" name="grantOrgan" style="width:280px;" value="${(certificates.grantOrgan)!''}" /></td>
				</tr>
				<tr>
					<td class="table-left" style="width:120px;">生效时间</td>
					<td>
						<#if certificates??>
							<@dt.dateTime name="grantTime" value=certificates.grantTime width="280px"/>
						<#else>
							<@dt.dateTime name="grantTime"  width="240px"/>
						</#if>	
					</td>
				</tr>
				<tr>
					<td class="table-left" style="width:120px;">有效期</td>
					<td><input type="text" id="validity" name="validity" style="width:280px;" value="${(certificates.validity)!''}" /></td>
				</tr>
				<tr>
					<td class="table-left">证照图片<a id="uploadFilesBtn" href="javascript:;">[选择]</a></td>
					<td id="annexListTable">
						<#if list??>
							<#list list as ca>
								<div class="filter-table rep" style="margin-left:5px; margin-bottom:0px;">
									<input type="radio" name="choose"  value="${ca.code}" <#if ca.cover=="true">checked="checked"</#if> />
									<input type="hidden" name="list[${ca_index}].code" value="${ca.code}" />
									<button type="button" class="close" data-dismiss="alert" onclick="javascript:deleteSelectedItem($(this));">&times;</button>
									<a class="title" target="_blank" href="${contextPath}upload/certificatesAnnex/${ca.sn}.${ca.ext}">${ca.name}</a>
								</div>
							</#list>
						</#if>
					</td>
				</tr>
				<tr>
					<td colspan="2" style="text-align:center;">
						<a href="javascript:;" class="btn btn-info" onclick="javascript:checkedCertificates();">
							<i class="fontello-icon-mail-4"></i>&nbsp;保&nbsp;&nbsp;存
						</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;" class="btn btn-info" onclick="javascript:sys_load_handle('certificates');">
							<i class="fontello-icon-block"></i>&nbsp;取&nbsp;&nbsp;消
						</a>
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>


<div id="tempAnnexListDiv" style="display:none;">
	<div class="filter-table rep" style="margin-left:5px; margin-bottom:0px;">
		<input class="name" type="hidden" />
		<input class="size" type="hidden" />
		<input class="sn" type="hidden"  />
		<input class="ext" type="hidden"  />
		<input id="afcs" class="afcs" type="hidden" name="afcs" />
		<input type="radio" name="font-cover" class="font-cover"   checked="checked"/>
		<button type="button"  class="close" data-dismiss="alert" onclick="javascript:deleteSelectedItem($(this));">&times;</button>
		<a class="title" href="#"></a>
	</div>
</div>
<input type="hidden" id="certificates_an_index" value="${(list?size)!'0'}" />